#ifndef MNETWORKTASK_H
#define MNETWORKTASK_H

#include <QObject>
#include <QTcpSocket>

class mNetworkTask : public QObject
{
    Q_OBJECT
public:
    explicit mNetworkTask(QObject *parent = nullptr);

signals:

public slots:
};


//Task 01
class NetworkTask_01 : public QObject
{
    Q_OBJECT
public:
    explicit NetworkTask_01(QObject *parent = nullptr);
    void Task01(QString rmtIP,unsigned short rmtPort);
    void recv_disconncet();
    void recv_query();
signals:
    void task_recv_msg(QByteArray recvMsg);

public slots:
private:
    QString rmIP;
    unsigned short rmPort;
    QTcpSocket* m_tcp;

};

//Task 02
class NetworkTask_02 : public QObject
{
    Q_OBJECT
public:
    explicit NetworkTask_02(QObject *parent = nullptr);
    void Task02(QString rmtIP, unsigned short rmtPort);
    void recv_disconncet();
    void recv_query();
signals:
    void task_recv_msg(QByteArray recvMsg);
public slots:
private:
    QString rmIP;
    unsigned short rmPort;
    QTcpSocket* m_tcp;
};

#endif // MNETWORKTASK_H
